Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluesky Social (Independent Publisher) #3706

Open
wants to merge 44 commits into
base: dev
Choose a base branch
from

Conversation

krautrocker
Copy link

@krautrocker krautrocker commented Nov 10, 2024


When submitting a connector, please make sure that you follow the requirements below, otherwise your PR might be rejected. We want to make you have a well-built connector, a smooth certification experience, and your users are happy :)

If this is your first time submitting to GitHub and you need some help, please sign up for this session.

  • I attest that the connector doesn't exist on the Power Platform today. I've verified by checking the pull requests in GitHub and by searching for the connector on the platform or in the documentation.
  • I attest that the connector works and I verified by deploying and testing all the operations.
  • I attest that I have added detailed descriptions for all operations and parameters in the swagger file.
  • I attest that I have added response schemas to my actions, unless the response schema is dynamic.
  • I validated the swagger file, apiDefinition.swagger.json, by running paconn validate command.
  • If this is a certified connector, I confirm that apiProperties.json has a valid brand color and doesn't use an invalid brand color, #007ee5 or #ffffff. If this is an independent publisher connector, I confirm that I am not submitting a connector icon.

If you are an Independent Publisher, you must also attest to the following to ensure a smooth publishing process:

  • I have named this PR after the pattern of "Connector Name (Independent Publisher)" ex: HubSpot Marketing (Independent Publisher)
  • Within this PR markdown file, I have pasted screenshots that show: 3 unique operations (actions/triggers) working within a Flow. This can be in one flow or part of multiple flows. For each one of those flows, I have pasted in screenshots of the Flow succeeding.
  • Within this PR markdown file, I have pasted in a screenshot from the Test operations section within the Custom Connector UI.
  • If the connector uses OAuth, I have provided detailed steps on how to create an app in the readme.md.

@krautrocker krautrocker requested a review from a team as a code owner November 10, 2024 19:39
@krautrocker
Copy link
Author

@microsoft-github-policy-service agree company="Dan Romano aka IDR, Inc. dba SWOLCAT"

@troystaylor
Copy link
Contributor

Hi Dan, I have a connector I’m working on too. Are you building more out or is this what you are going to submit (without the Proposal)?

@krautrocker
Copy link
Author

krautrocker commented Nov 10, 2024

Hi Dan, I have a connector I’m working on too. Are you building more out or is this what you are going to submit (without the Proposal)?

Hi Troy, I will be building out more. These three actions are just the start and will be expanding in the next few hours. To get this up and running, we only need three actions but there's a lot more than we can and will add, naturally. What do you think?

@troystaylor
Copy link
Contributor

I tend to build them all. Are you having any problems with the OAuth?

@krautrocker
Copy link
Author

Right now, I've got basic auth going with the app passwords and rooting around for OAuth...but not seeing where we can create a client and secret. Posted in the dev channel on Bluesky but no response yet (recent post).

@fordosa90
Copy link
Contributor

@krautrocker Dan, please remove changes to the BkkFutar connector, I am not yet planning to update its authentication ;)

@krautrocker
Copy link
Author

@krautrocker Dan, please remove changes to the BkkFutar connector, I am not yet planning to update its authentication ;)

Damn, my mistake - will remove at once this evening.

@krautrocker
Copy link
Author

krautrocker commented Nov 12, 2024

Test operation validation below. Proof of life:

1.) Create session

Bluesky_Custom_Connector_CreateSession

2.) Get preferences

Bluesky_Custom_Connector_GetPreferences

3.) List notifications

Bluesky_Custom_Connector_ListNotifications

/**/

Flow will be ready later tonight or tomorrow once warnings and schemas are otherwise validate. All errors have been cleared via paconn validate.

@krautrocker
Copy link
Author

krautrocker commented Nov 12, 2024

Working flow:

Actions list (non-exhaustive):

image

1.) Create session

image

/**/

More tomorrow!

@krautrocker
Copy link
Author

krautrocker commented Nov 16, 2024

@vmanoharas Alrighty, I removed the .gitignore file and I'm in the process of consolidating the folders for ease of review and clarity.

Thanks for the help, will have this finished ASAP for review next week.

@krautrocker krautrocker changed the title Proposal - Bluesky (Independent Publisher) Proposal - Bluesky Social (Independent Publisher) Nov 17, 2024
- Validated with paconn, no errors

- Moved global definitions position

Ready to test with a client and secret.
Copy link
Author

@krautrocker krautrocker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to test, but a few housekeeping items do remain. This PR is indeed different from this other PR #3711 but may merge the branches.

- Added connection parameters to apiProperties

- Added policy templates to apiProperties

- Added endpoint for refreshSession

- Validated with paconn, no errors
Copy link
Author

@krautrocker krautrocker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this PR, I implemented connection parameters and policy templates per @Laskewitz guidance. I tested this in a flow and it works.

Additional testing required for authentication and, naturally, the other 70+ endpoints. actor, for example, is a parameter in about 12 endpoints that needed to be changed from actorId to just actor. QA + testing ready.

@vmanoharas
Copy link
Contributor

vmanoharas commented Nov 19, 2024

Hello @krautrocker,

Can you please remove the word Proposal from the title?

@krautrocker krautrocker changed the title Proposal - Bluesky Social (Independent Publisher) Bluesky Social (Independent Publisher) Nov 19, 2024
…OpenAPI spec (though not 3.0)

- Removed dead code for definitions if they were only referenced but never uses.

- Combined all endpoints into a single connector. Not yet comprehensive but on the way to a one-stop shop.

- Validated with paconn, no errors.
@krautrocker
Copy link
Author

1.) Endpoints QA'd

Though not yet complete, I took a different approach today to effectively align the endpoints with Bluesky's specs. Parameters are matching up in both name and composition.

2.) All-in-one

I am combining all namespaces and endpoints into a single connector. So far, so good. If this goes well, then there will be only one PR.

3.) Connector size

Small, only 150KB so far. The definition references really do save space, and there's probably more room for enhancement here. Global definitions have been a great start, which has cut down on code bulk.

4.) Removed dead code

A few definitions were "declared but never used." These have been removed.

/**/

Plan for tomorrow:

  • Add remaining endpoints.

Plan after tomorrow:

  • Test with data from Bluesky. Aside from the simple things such as actor Id, user email, I'll find values for a repo Id or any other endpoint in order to test all actions.

  • Request review.

- Added 401 to responses.

- Validated with paconn, no errors.
@krautrocker
Copy link
Author

krautrocker commented Nov 21, 2024

Only 50 endpoints remaining. Validation is clean. The rest will be completed tomorrow.

File size is far below the 1MB limit.

In order to test this, I will need play around in Bluesky. Create lists, get a post Id or other item and conduct operations on it via endpoints.

- Removed dead code, ProfileViewBasic.

- Added definition for 401 errors.

- Validated with paconn, no errors.
… getBlob, and uploadBlob.

- Validated with paconn, no errors.

- Custom connector editor UI returns no errors or warnings.
@krautrocker
Copy link
Author

krautrocker commented Nov 22, 2024

Notes:

  • All endpoints are present in the connector. Around ~165 with a filze size < 500kb.

  • Response codes need to be made consistent. This is mostly the error codes 400, 401, 403 and 500.

  • Descriptions for parameters and endpoints can be added where they are missing and preferred.

Housekeeping items to be completed tomorrow.

/**/

This is ready to test. The app.bsky endpoints will be straight-forward. The "control panel" endpoints may require some thought but none of them seem supernatural.

@krautrocker
Copy link
Author

In the process of creating test cases for all endpoints. This will include happy paths and expected output for response codes.

🖖

Copy link
Contributor

@vmanoharas vmanoharas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @krautrocker,

Kindly address the review comments and please go through the below document and update all the artifacts related to independent publisher.

"app.bsky.actor"
],
"summary": "Get Preferences for Current Account",
"description": "*This endpoint is part of the Bluesky application Lexicon APIs (app.bsky.*). Public endpoints which don't require authentication can be made directly against the public Bluesky AppView API: https://public.api.bsky.app. Authenticated requests are usually made to the user's PDS, with automatic service proxying. Authenticated requests can be used for both public and non-public endpoints.* *To learn more about calling atproto API endpoints like this one, see the Get private preferences attached to the current account. Expected use is synchronization between multiple devices and import/export during account migration. Requires authentication.\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep all parameters descriptions short to fit in the text box. please see our docs.

@@ -0,0 +1,136 @@
# Bluesky API Connector
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update readme.md file with all the required fields mentioned in the below link.

https://github.com/microsoft/PowerPlatformConnectors/blob/dev/templates/Independent%20Publisher/readme.md

@@ -0,0 +1,73 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants